package com.itlong.cloud.config.filelistener;

import org.springframework.stereotype.Component;

@Component
public class ProgressEntity {
    // 读取的文件的比特数
    private long pBytesRead = 0L;
    // 文件的总大小
    private long pContentLength = 0L;
    // 目前正在读取第几个文件
    private int pItems;

    private String deviceUnique;

    private String deviceType;

    private String fileName;

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getDeviceUnique() {
        return deviceUnique;
    }

    public void setDeviceUnique(String deviceUnique) {
        this.deviceUnique = deviceUnique;
    }

    private long startTime = System.currentTimeMillis();

    public ProgressEntity() {
        pBytesRead = 0L;
        pContentLength = 0L;
    }

    public long getPBytesRead() {
        return pBytesRead;
    }

    public void setPBytesRead(long bytesRead) {
        pBytesRead = bytesRead;
    }

    public long getPContentLength() {
        return pContentLength;
    }

    public void setPContentLength(long contentLength) {
        pContentLength = contentLength;
    }

    public int getPItems() {
        return pItems;
    }

    public void setPItems(int items) {
        pItems = items;
    }


    @Override
    public String toString() {
        return "ProgressEntity{" +
                "pBytesRead=" + pBytesRead +
                ", pContentLength=" + pContentLength +
                ", pItems=" + pItems +
                ", deviceUnique='" + deviceUnique + '\'' +
                ", startTime=" + startTime +
                '}';
    }
}
